//
//  WPCHomepageView.m
//  Wallpaper.co
//
//  Created by zhou_yuepeng on 2017/9/1.
//  Copyright © 2017年 www.dahuatech.com. All rights reserved.
//

#import "WPCHomepageView.h"

@interface WPCHomepageView()
@property(nonatomic, strong)NSString *cellIdentifier;
@end

@implementation WPCHomepageView

- (instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)collectionViewLayout cellIdentifier:(NSString*)cellIdentifier
{
    self = [super initWithFrame:frame collectionViewLayout:collectionViewLayout];
    if (self) {
        _cellIdentifier = cellIdentifier;
        
        self.backgroundColor = [UIColor blackColor];
        self.prefetchingEnabled = NO;
        
        [self registerClass:NSClassFromString(_cellIdentifier) forCellWithReuseIdentifier:_cellIdentifier];
    }
    
    return self;
}

- (UICollectionViewCell*)cellForItemWithIndexPath:(NSIndexPath *)indexPath
{
    UICollectionViewCell *cell = [self dequeueReusableCellWithReuseIdentifier:_cellIdentifier forIndexPath:indexPath];
    return cell;
}

@end
